/<template>
  <div class="index">
    <div class="left">
      <el-row class="tac">
      <el-col >
        <h5>默认颜色</h5>
        <el-menu
          router
          class="el-menu-vertical-demo"
          mode="horizonta"
          @open="handleOpen"
          @close="handleClose">
            <TreeMenuVue :tree_data = "children_Router"/>
        </el-menu>
      </el-col>
    </el-row>

    </div>
   
    <div>
      <router-view/>
    </div>
  </div>
</template>

<script>
import  children_Router from "@/mock/Route.json"
// import {children_Router} from "@/router/index"
import TreeMenuVue from '@/components/TreeMenu.vue';

export default {
  name: 'Main',
  data(){
    return {
      children_Router
    }
  },
  components:{
    TreeMenuVue
  },
  methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
}
</script>

<style lang="scss">
.index{
  display: flex;
  .left{
    width: 200px;
  }
}
</style>